/*
 * Copyright [2025] [JinBooks of copyright http://www.jinbooks.com]
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
 



package com.jinbooks.enums;


import lombok.Getter;

@Getter
public enum OrgsBusinessExceptionEnum {
    SUB_USERS_EXISTS(500001, "请先移除/移动当前组织机构下的用户"),
    SYNC_USERS_EXISTS(500001, "请先移除/移动当前组织机构下的同步用户"),
    SUB_ORGS_EXISTS(500002, "请先移除/移动当前组织机构下的部门"),
    ILLEGAL_MOVE_ORG(500003, "非法的移动操作"),
    SUB_USERS_ACTIVE(500004, "请先禁用当前组织机构下的活跃用户"),
    SYNC_USERS_ACTIVE(500004, "请先禁用当前组织机构下的同步用户"),
    SUB_ORGS_ACTIVE(500005, "请先禁用当前组织机构下的活跃部门"),
    CURRENT_ORGS_ACTIVE(500006, "请先禁用活跃组织后再进行删除"),
    CURRENT_USERS_ACTIVE(500006, "请先禁用活跃用户后再进行删除"),
    PARENT_ORGS_FORBIDDEN(500007, "请先启用当前组织机构的父级组织机构"),

    DUPLICATE_ORGS_EXIST(500008, "当前企业层级已存在相同机构名称，请重新输入"),
    DUPLICATE_ORGSCODE_EXIST(500009, "当前企业已存在相同的编码，请重新输入"),
    GROUP_ALREADY_USED(500010, "当前分组正在被使用，无法禁用"),
    GROUPS_ACTIVE(500011, "请先禁用当前分组后再进行删除");


    final String msg;
    final Integer code;

    OrgsBusinessExceptionEnum(Integer code, String msg) {
        this.msg = msg;
        this.code = code;
    }

}
